package com.dawan.sbjy.Config;

import org.springframework.amqp.core.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RabbitConfig {
    @Bean
    public Queue lileQueue() {
        return new Queue("lile");
    }
    @Bean
    public Queue suyayuQueue() {
        return new Queue("suyayu");
    }
    @Bean
    DirectExchange exchange() {
        return new DirectExchange("lilechange");
    }

    @Bean
    Binding binding() {
        return BindingBuilder.bind(lileQueue()).to(exchange()).with("1234");
    }

}
